package com.flyemu.share.entity;


import jakarta.persistence.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.CreationTimestamp;

import java.time.LocalDateTime;


/**
 * @功能描述: 财务系统账号信息
 * @创建时间: 2024年05月28日
 * @公司官网: www.fenxi365.com
 * @公司信息: 纷析云（杭州）科技有限公司
 * @公司介绍: 专注于财务相关软件开发, 企业会计自动化解决方案
 */

@Getter
@Setter
@Entity
@NoArgsConstructor
@Table(uniqueConstraints = {
        @UniqueConstraint( columnNames = {"merchantId", "organizationId"}),
})
public class RelationAccount {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Comment("创建时间")
    @CreationTimestamp
    @Column(updatable = false)
    private LocalDateTime createDate;

    @Comment("财务映射Id")
    private Long relationCwId;

    @Comment("财务系统cookie")
    private String cookie;

    @Comment("财务系统密码")
    private String password;

    @Comment("财务系统账号")
    private String mobile;

    @Comment("财务系统地址")
    private String url;

    @Comment("创建人Id")
    @Column(nullable = false)
    private Long adminId;

    @Comment("组织ID")
    @Column(nullable = false)
    private Long organizationId;

    @Comment("商户ID")
    @Column(nullable = false)
    private Long merchantId;


}
